load

inline suspend fun load(name: String, version: String, arch: String? = null, addToPath: Boolean = false, download: (version: String) -> Path): Path

Load the tool from cache if it is cached, otherwise download and cache it.

download is passed version. It should return a ready to use tool, with any necessary extraction or setup done.

Parameters

name

the tool's name

version

the tool's version

arch

the arch to get, or null to use the current arch

addToPath

whether to add the gotten tool to PATH

download

download and extract the tool

Sources

js source
Link copied to clipboard